home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6378 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: cpca3.uea.ac.uk!news
  2. From: John Swindells <jrs@sys.uea.ac.uk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: using my own libraries (newbie urgent)
  5. Date: Mon, 12 Feb 1996 13:12:51 +0000
  6. Organization: University of East Anglia, Norwich, Norfolk, NR47TJ, UK
  7. Message-ID: <311F3CD3.41C6@sys.uea.ac.uk>
  8. References: <311ec2e6.4502345@nntp.ix.netcom.com>
  9. NNTP-Posting-Host: akira.sys.uea.ac.uk
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP22)
  14.  
  15. Andrew Chosak wrote:
  16. > but can't run because it says undefined function "areacirc(double)"
  17. > I know all syntax is right, what's WRONG!!!
  18. >
  19. Have you managed to compile geometry.c?  This should generate an object
  20. file (geometry.o or geometry.obj) that can be linked in with the object
  21. file of your main program file, to generate an executable.  The normal
  22. command to compile is (in this case)
  23.  
  24.     cc -o program program.c geometry.c
  25.  
  26. where the parameter after the '-o' is the name of the exectutable you
  27. want to produce.  This compiles both source files (creating their
  28. equivalent object files); you could - to save recompilation time - put
  29. an object file on the command line if you know the object file is up to
  30. date, eg, 
  31.     
  32.     cc -o program program.c geometry.o
  33.  
  34. If you're working in an integrated environment (eg, Borland C++ for PC),
  35. it is simply a case of adding all the source files you want to the
  36. project.
  37.  
  38. Hope this helps.
  39.  
  40. John 
  41. -- 
  42.  
  43. Postgraduate researcher in the field of image processing.
  44. phone:    external      (01603) 592983
  45.           uea internal  x.2983
  46. e-mail:   jrs@sys.uea.ac.uk
  47. www:      http://www.sys.uea.ac.uk/~jrs
  48.